package com.dz.lm.service.feedback.impl;

import java.util.Map;

import com.dz.lm.common.exception.DaoException;
import com.dz.lm.common.exception.ServiceException;
import com.dz.lm.dao.feedback.read.FeedbackDao;
import com.dz.lm.service.AbstractService;
import com.dz.lm.service.feedback.FeedbackService;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class FeedbackServiceImpl extends AbstractService implements FeedbackService {

	@Resource(name = "readFeedbackDao")
    private FeedbackDao readFeedbackDao;
	
	@Resource(name = "writeFeedbackDao")
    private com.dz.lm.dao.feedback.write.FeedbackDao writeFeedbackDao;
    
    public FeedbackServiceImpl() {
        System.out.println(">>>>>>>>>>>> FeedbackServiceImpl");
    }

	@Override
    public int submitFeedback(Map<String, Object> param) throws ServiceException {
    	int count = 0;
    	try {
    		count = writeFeedbackDao.submitFeedback(param);
		} catch (DaoException e) {
			e.printStackTrace();
		}
    	return count;
    }

}
